//
//  Extension.swift
//  YDWeibo01
//
//  Created by suibian on 16/8/9.
//  Copyright © 2016年 iitcast. All rights reserved.
//

import UIKit
import SDWebImage
extension UIImageView {
//便利构造函数
    convenience init(imageName:String){
    
        self.init(image: UIImage(named:imageName))
    }
//    对sd_image封装一次

    func yd_setImageWithString(imgName:String?,placeholderImgName:String){
        
    self.sd_setImageWithURL(NSURL(string: imgName ?? ""), placeholderImage:UIImage(named: placeholderImgName))
        
    
    }
}